<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>JsDoc Reference - TableTools</title>
		<link href="../css/default.css" type="text/css" rel="stylesheet" media="all" />
	</head>

	<body>
		<div id="header">
</div>

		<div class="index">
			<div class="menu">
				<!-- begin publish.classesIndex -->
				<div align="center"><a href="../index.html">Class Index</a> | <a href="../files.html">File Index</a></div>

<h2 class="heading1">Classes</h2>

<ul class="classList">
	
		<li><a href="../symbols/_global_.html">_global_</a></li>
	
		<li><a href="../symbols/TableTools.html">TableTools</a></li>
	
		<li><a href="../symbols/TableTools%23dom.html">TableTools#dom</a></li>
	
		<li><a href="../symbols/TableTools%23dom.collection.html">TableTools#dom.collection</a></li>
	
		<li><a href="../symbols/TableTools%23dom.print.html">TableTools#dom.print</a></li>
	
		<li><a href="../symbols/TableTools%23s.html">TableTools#s</a></li>
	
		<li><a href="../symbols/TableTools%23s.print.html">TableTools#s.print</a></li>
	
		<li><a href="../symbols/TableTools%23s.select.html">TableTools#s.select</a></li>
	
		<li><a href="../symbols/TableTools.BUTTONS.html">TableTools.BUTTONS</a></li>
	
		<li><a href="../symbols/TableTools.DEFAULTS.html">TableTools.DEFAULTS</a></li>
	
</ul>

				<!-- end publish.classesIndex -->
			</div>
			
			<div class="fineprint" style="clear:both">
				
				Generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Sat Feb 26 2011 14:41:27 GMT-0000 (GMT)<br />
				HTML template: <a href="http://www.thebrightlines.com/2010/05/06/new-template-for-jsdoctoolkit-codeview/" target="_blank">Codeview</a>
			</div>
		</div>
		
		<div class="content">
			<div class="innerContent">
				<h1 class="classTitle">
					
					Class <span>TableTools</span>
				</h1>

				<p class="description summary">
					
					
					
				
					TableTools
					
					
						<br /><em>Defined in: </em> <a href="../symbols/src/js_TableTools.js.html">TableTools.js</a>.
					
				</p>

				
					<div class="props">
						<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class TableTools.">
							<caption>Class Summary</caption>
							<thead>
								<tr>
									<th scope="col">Constructor Attributes</th>
									<th scope="col">Constructor Name and Description</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription" >
										<div class="fixedFont">
											<b><a href="../symbols/TableTools.html#constructor">TableTools</a></b>(oDT, oOpts)
										</div>
										<div class="description">TableTools provides flexible buttons and other tools for a DataTables enhanced table</div>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				

				
					
					
						<div class="props">
							<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class TableTools.">
								<caption>Field Summary</caption>
								
								<thead>
									<tr>
										<th scope="col">Field Attributes</th>
										<th scope="col">Field Name and Description</th>
									</tr>
								</thead>
								
								<tbody>
									
										<tr>
											<td class="attributes">&lt;constant&gt; &nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont">
												<b><a href="../symbols/TableTools.html#CLASS">CLASS</a></b>
												</div>
												<div class="description">Name of this class</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&lt;static&gt; &lt;constant&gt; &nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont">
												TableTools.<b><a href="../symbols/TableTools.html#.VERSION">VERSION</a></b>
												</div>
												<div class="description">TableTools version</div>
											</td>
										</tr>
									
								</tbody>
							</table>
						</div>
					
					
					
				

	<!--
	#### METHODS SUMMARY
	-->
				
					
					
						<div class="props">
							<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class TableTools.">
								<caption>Method Summary</caption>
								
								<thead>
									<tr>
										<th scope="col">Method Attributes</th>
										<th scope="col">Method Name and Description</th>
									</tr>
								</thead>
								
								<tbody>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnCalcColRatios">fnCalcColRatios</a></b>(oConfig)
												</div>
												<div class="description">Calculate a unity array with the column width by proportion for a set of columns to be
included for a button.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&lt;static&gt; &nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont">TableTools.<b><a href="../symbols/TableTools.html#.fnGetInstance">fnGetInstance</a></b>(node)
												</div>
												<div class="description">Get the master instance for a table node (or id if a string is given)</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&lt;static&gt; &nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont">TableTools.<b><a href="../symbols/TableTools.html#.fnGetMasters">fnGetMasters</a></b>()
												</div>
												<div class="description">Get an array of all the master instances</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnGetSelected">fnGetSelected</a></b>()
												</div>
												<div class="description">Retreieve the settings object from an instance</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnGetTableData">fnGetTableData</a></b>(oConfig)
												</div>
												<div class="description">Get the information contained in a table as a string</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnGetTitle">fnGetTitle</a></b>(oConfig)
												</div>
												<div class="description">Get the title of the document - useful for file names.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnIsSelected">fnIsSelected</a></b>(n)
												</div>
												<div class="description">Check to see if a current row is selected or not</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnResizeButtons">fnResizeButtons</a></b>()
												</div>
												<div class="description">Resize the flash elements of the buttons attached to this TableTools instance - this is
useful for when initialising TableTools when it is hidden (display:none) since sizes can't
be calculated at that time.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnResizeRequired">fnResizeRequired</a></b>()
												</div>
												<div class="description">Check to see if any of the ZeroClipboard client's attached need to be resized</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnSelectAll">fnSelectAll</a></b>()
												</div>
												<div class="description">Select all rows in the table</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnSelectNone">fnSelectNone</a></b>()
												</div>
												<div class="description">Deselect all rows in the table</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnSetText">fnSetText</a></b>(clip, text)
												</div>
												<div class="description">Pass text to a flash button instance, which will be used on the button's click handler</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/TableTools.html#fnSettings">fnSettings</a></b>()
												</div>
												<div class="description">Retreieve the settings object from an instance</div>
											</td>
										</tr>
									
								</tbody>
							</table>
						</div>
					
					
					
				
				
	<!--
	#### EVENTS SUMMARY
	-->
				

	<!--
	#### CONSTRUCTOR DETAILS
	-->
				
					<div class="details props">
						<div class="innerProps">
							<a name="constructor"></a>
							
							<div class="sectionTitle">
								Class Detail
							</div>
							
							<div class="fixedFont">
								<b>TableTools</b>(oDT, oOpts)
							</div>
							
							<div class="description">
								TableTools provides flexible buttons and other tools for a DataTables enhanced table
								
							</div>
							
							
						
							
								<dl class="detailList params">
									<dt class="heading">Parameters:</dt>
									
										<dt>
											<span class="light fixedFont">{Object}</span>  <b>oDT</b>
											
										</dt>
										<dd>DataTables instance</dd>
									
										<dt>
											<span class="light fixedFont">{Object}</span>  <b>oOpts</b>
											
										</dt>
										<dd>TableTools options</dd>
									
										<dt>
											<span class="light fixedFont">{String}</span>  <b>oOpts.sSwfPath</b>
											
										</dt>
										<dd>ZeroClipboard SWF path</dd>
									
										<dt>
											<span class="light fixedFont">{String}</span>  <b>oOpts.sRowSelect</b>
											
										</dt>
										<dd>Row selection options - 'none', 'single' or 'multi'</dd>
									
										<dt>
											<span class="light fixedFont">{Function}</span>  <b>oOpts.fnPreRowSelect</b>
											
										</dt>
										<dd>Callback function just prior to row selection</dd>
									
										<dt>
											<span class="light fixedFont">{Function}</span>  <b>oOpts.fnRowSelected</b>
											
										</dt>
										<dd>Callback function just after row selection</dd>
									
										<dt>
											<span class="light fixedFont">{Function}</span>  <b>oOpts.fnRowDeselected</b>
											
										</dt>
										<dd>Callback function when row is deselected</dd>
									
										<dt>
											<span class="light fixedFont">{Array}</span>  <b>oOpts.aButtons</b>
											
										</dt>
										<dd>List of buttons to be used</dd>
									
								</dl>
							
							
							
						</div>
					</div>
				

	<!--
	#### FIELD DETAILS
	-->
				
					<div class="details props">
						<div class="innerProps">

							<div class="sectionTitle">
								Field Detail
							</div>
							
							
								<a name="CLASS"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									&lt;constant&gt; 
									</span>
									
									<span class="light">{String}</span>
									
									<b>CLASS</b>							
								</div>
								
								<div class="description">
									Name of this class
									
									
									
								</div>
								
								

								
									<dl class="detailList nomargin">
									
										
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												TableTools
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<a name=".VERSION"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									&lt;static&gt; &lt;constant&gt; 
									</span>
									
									<span class="light">{String}</span>
									
									<span class="light">TableTools.</span><b>VERSION</b>							
								</div>
								
								<div class="description">
									TableTools version
									
									
									
								</div>
								
								

								
									<dl class="detailList nomargin">
									
										
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												2.0.1
											</dd>
										
									</dl>
								
								
								
							
						</div>
					</div>
				

	<!--
	#### METHOD DETAILS
	-->		
				
					<div class="details props">
						<div class="innerProps">
							<div class="sectionTitle">
								Method Detail
							</div>
							
							
								<a name="fnCalcColRatios"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Array}</span>
									
									<b>fnCalcColRatios</b>(oConfig)
								</div>
								
								<div class="description">
									Calculate a unity array with the column width by proportion for a set of columns to be
included for a button. This is particularly useful for PDF creation, where we can use the
column widths calculated by the browser to size the columns in the PDF.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{Object}</span> <b>oConfig</b>
												
											</dt>
											<dd>Button configuration object</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{Array}</span> Unity array of column ratios</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name=".fnGetInstance"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									&lt;static&gt; 
									</span>
									
									<span class="light">{Object}</span>
									
									<span class="light">TableTools.</span><b>fnGetInstance</b>(node)
								</div>
								
								<div class="description">
									Get the master instance for a table node (or id if a string is given)
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<b>node</b>
												
											</dt>
											<dd></dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{Object}</span> ID of table OR table node, for which we want the TableTools instance</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name=".fnGetMasters"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									&lt;static&gt; 
									</span>
									
									<span class="light">{Array}</span>
									
									<span class="light">TableTools.</span><b>fnGetMasters</b>()
								</div>
								
								<div class="description">
									Get an array of all the master instances
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{Array}</span> List of master TableTools instances</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="fnGetSelected"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{array}</span>
									
									<b>fnGetSelected</b>()
								</div>
								
								<div class="description">
									Retreieve the settings object from an instance
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{array}</span> List of TR nodes which are currently selected</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="fnGetTableData"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{String}</span>
									
									<b>fnGetTableData</b>(oConfig)
								</div>
								
								<div class="description">
									Get the information contained in a table as a string
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{Object}</span> <b>oConfig</b>
												
											</dt>
											<dd>Button configuration object</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{String}</span> Table data as a string</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="fnGetTitle"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{String}</span>
									
									<b>fnGetTitle</b>(oConfig)
								</div>
								
								<div class="description">
									Get the title of the document - useful for file names. The title is retrieved from either
the configuration object's 'title' parameter, or the HTML document title
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{Object}</span> <b>oConfig</b>
												
											</dt>
											<dd>Button configuration object</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{String}</span> Button title</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="fnIsSelected"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Boolean}</span>
									
									<b>fnIsSelected</b>(n)
								</div>
								
								<div class="description">
									Check to see if a current row is selected or not
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{Node}</span> <b>n</b>
												
											</dt>
											<dd>TR node to check if it is currently selected or not</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{Boolean}</span> true if select, false otherwise</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="fnResizeButtons"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									
									
									<b>fnResizeButtons</b>()
								</div>
								
								<div class="description">
									Resize the flash elements of the buttons attached to this TableTools instance - this is
useful for when initialising TableTools when it is hidden (display:none) since sizes can't
be calculated at that time.
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd>void</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="fnResizeRequired"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									
									
									<b>fnResizeRequired</b>()
								</div>
								
								<div class="description">
									Check to see if any of the ZeroClipboard client's attached need to be resized
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd>void</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="fnSelectAll"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									
									
									<b>fnSelectAll</b>()
								</div>
								
								<div class="description">
									Select all rows in the table
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd>void</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="fnSelectNone"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									
									
									<b>fnSelectNone</b>()
								</div>
								
								<div class="description">
									Deselect all rows in the table
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd>void</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="fnSetText"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									
									
									<b>fnSetText</b>(clip, text)
								</div>
								
								<div class="description">
									Pass text to a flash button instance, which will be used on the button's click handler
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{Object}</span> <b>clip</b>
												
											</dt>
											<dd>Flash button object</dd>
										
											<dt>
												<span class="light fixedFont">{String}</span> <b>text</b>
												
											</dt>
											<dd>Text to set</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd>void</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="fnSettings"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{object}</span>
									
									<b>fnSettings</b>()
								</div>
								
								<div class="description">
									Retreieve the settings object from an instance
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{object}</span> TableTools settings object</dd>
											
										
										
										
										
										
									
									</dl>
								

								
							
						</div>
					</div>
				
				
	<!--
	#### EVENT DETAILS
	-->		
				
			</div>
		</div>
	</body>
</html>
